<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>星星</title>
    <script src="js/jquery.min.js"></script>
</head>
<body>
    <div class="box">
        <img src="img/01-02.png" alt="">
        <img src="img/01-02.png" alt="">
        <img src="img/01-02.png" alt="">
        <img src="img/01-02.png" alt="">
        <img src="img/01-02.png" alt="">
    </div>
    
</body>
<script>
    $box = $(".box");

    $box.on('mouseenter', 'img', function(){
        $(this).attr('src', 'img/01-01.png').prevAll().attr('src', 'img/01-01.png');
    });

    $box.on('mouseleave', 'img', function(){
        $(this).attr('src', 'img/01-02.png').prevAll().attr('src', 'img/01-02.png');
    });
</script>
</html>